package cn.gzjp.modules.it.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.gzjp.common.persistence.Page;
import cn.gzjp.common.service.CrudService;
import cn.gzjp.modules.it.entity.MemberCar;
import cn.gzjp.modules.it.dao.MemberCarDao;

/**
 * 会员车辆Service
 * @author 会员车辆
 * @version 2018-01-26
 */
@Service
@Transactional(readOnly = true)
public class MemberCarService extends CrudService<MemberCarDao, MemberCar> {

	public MemberCar get(String id) {
		return super.get(id);
	}
	
	public List<MemberCar> findList(MemberCar memberCar) {
		return super.findList(memberCar);
	}
	
	public Page<MemberCar> findPage(Page<MemberCar> page, MemberCar memberCar) {
		return super.findPage(page, memberCar);
	}
	
	@Transactional(readOnly = false)
	public void insert(MemberCar memberCar) {
		dao.insert(memberCar);
	}
	@Transactional(readOnly = false)
	public void updateSort(MemberCar memberCar) {
		dao.update(memberCar);
	}
	
	@Transactional(readOnly = false)
	public void delete(MemberCar memberCar) {
		super.delete(memberCar);
	}
	public MemberCar findByMemberIdAndCarId(MemberCar mc){
		return this.dao.findByMemberIdAndCarId(mc);
	}
	
	public Integer findMaxSort(MemberCar mc){
		return this.dao.findMaxSort(mc);
	}
	
}